package com.nineclock.message.listener;

import com.nineclock.dto.SysAllowedJoinCompanyUserDTO;
import com.nineclock.message.service.NcMessageService;
import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
@RocketMQMessageListener(topic = "AllowedMessageUpdate", consumerGroup = "MessageGroup")
public class AllowedMessageListener implements RocketMQListener<String> {
    @Autowired
    NcMessageService ncMessageService;
    @Override
    public void onMessage(String id) {
        log.info("messageUpdate:" + id);
        ncMessageService.allowedMessageUpdate(id);
    }
}
